package qa.ui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.CardLayout;

public class Screen extends JFrame {

	public static final String WELCOME = "welcome";
	public static final String Q1 = "q1";
	public static final String Q2 = "q2";
	public static final String BalanceInformation = "balanceInformation";
	public static final String WithdrawlMenu = "withdrawlMenu";
	public static final String DepositCash = "depositCash";
	public static final String Exit = "exit";
	public static final String RESULT = "result";
	
	private JPanel contentPane;
	
	private Welcome welcome;
	private Q1 q1;
	private Q2 q2;
	private BalanceInformation bi;
	private WithdrawlMenu wm;
	private DepositCash dc;
	private Exit ex;
	private Result result;

	private CardLayout c;
	
	public Screen() {	
		super("Property of Esbjerg Lufthavn");
		
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new CardLayout(0, 0));
		
		welcome = new Welcome();
		contentPane.add(welcome, "welcome");
		
		q1 = new Q1();
		contentPane.add(q1, "q1");
		
		q2 = new Q2();
		contentPane.add(q2, "q2");
		
		bi = new BalanceInformation ();
		contentPane.add(bi, "balanceInformation");
		
		wm= new WithdrawlMenu ();
		contentPane.add(wm, "withdrawlMenu");
		
		dc= new DepositCash();
		contentPane.add(dc, "depositCash");
		
		ex = new Exit();
		contentPane.add(ex, "exit");
		
		result = new Result();
		contentPane.add(result, "name_15738661078262");
		
		c = (CardLayout) getContentPane().getLayout();
	}
	
	public Welcome getWelcome() {
		return welcome;
	}

	public Q1 getQ1() {
		return q1;
	}

	public Q2 getQ2() {
		return q2;
	}

	public BalanceInformation getBalanceInformation(){
		return bi;
		
	}
	public WithdrawlMenu getWithdrawlMenu(){
		return wm;
	}
	
	public DepositCash getDepositCash(){
		return dc;
		
	}
	
	public Exit getExit(){
		return ex;
	}
	public Result getResult() {
		return result;
	}

	public void show(String card) {
		c.show(this.getContentPane(), card);
	}

}

